/*实验室检查*/
import Field from 'winged/utils/wt-model-field'
export default {
	title: '实验室检查',
	name: 'examination',
	tableName: 'clinic_check',
	single: false,
	query: {
		method: 'GET',
		url: 'doctor/patient/clinical_check',
		transfer: true,
		pagination: true,
		extraParams: [
			'case_id',
		]
	},
    count: {
        method: 'GET',
        url: 'doctor/patient/clinical_check/count',
        transfer: true,
        extraParams: [
            'case_id',
        ],
    },
	new: {
		method: 'POST',
		url: 'doctor/patient/clinical_check',
		transfer: true,
		extraParams: [
			'case_id',
		]
	},
	update: {
		method: 'PUT',
		url: 'doctor/patient/clinical_check',
		transfer: true
	},
	delete: {
		method: 'DELETE',
		url: 'doctor/patient/clinical_check',
		transfer: true
	},
	id_field: {
		name: 'check_id',
	},
	fields: [
		{
			label: '检查名称',
			type: Field.types.text,
			display: true,
			summary: true,
			name: 'check_name',
			tableName: 'checkName',
			rules: [{ required: true, message: '请输入检查名称', trigger: 'change' }]
		},
		{
			label: '检查时间',
			type: Field.types.date,
			display: true,
			name: 'check_date',
			tableName: 'checkDate',
			rules: [{ type: 'date', required: true, message: '请选择检查时间', trigger: 'change' }]
		}, {
			label: '备注',
			type: Field.types.textarea,
			display: true,
			name: 'comment',
			tableName: 'comment'
		}, {
			label: '检查图像',
			type: Field.types.images,
			display: true,
			summary: true,
			name: 'image_urls',
			tableName: 'checkImages',
			uploadByComponent: true,
			saveAsJson: true,
			preSubmit: true,
		}
	]
};